<template>
    <div>
        {{ count }}&nbsp;<button @click="addCount">count++</button>
    </div>
</template>

<script>

export default {
    setup() {
        let count = 0;
        const addCount = () => {
            console.log(`++之后：${count}`);
            count++;
            console.log(`++之后：${count}`);
        }
        return { count, addCount }
    }
}
</script>
